<!--包含头部文件-->

{include file="public/head" /}

<body>

<nav class="breadcrumb">留言列表 </nav>

<div class="page-container">



	<div class="mt-20">

			<table class="table table-border table-bordered table-bg table-hover table-sort mt-20">

				<thead>

					<tr class="text-c">

						<th width="50">ID</th>

						<th width="250">姓名</th>
						<th width="250">电话</th>

						<th width="250">内容</th>

						<th width="250">时间</th>						

						<th width="50">操作</th>

					</tr>

				</thead>

				<tbody>

					{volist name="messageData" id="vo"}

					<tr class="text-c">

						<td>{$vo.id}</td>

						<td>{$vo.name}</td>
						<td>{$vo.mobile}</td>
						<td>{$vo.content|raw}</td>

						<td>{$vo.time|date="Y-m-d H:i"}</td>

						<td class="td-manage"><a style="text-decoration:none" class="ml-5" href="{:url('message/edit',array('id'=>$vo.id))}" title="查看"><i class="Hui-iconfont">&#xe665;</i></a><a style="text-decoration:none" class="ml-5" onClick="delete_confirm('{:url('base/del',array('id'=>$vo.id,'dbname'=>'admin'))}')" href="javascript:;"  title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>

					</tr>

					{/volist}

					

				</tbody>

			</table>

			{$messageData|raw}

	</div>

</div>

<!--包含头部文件-->

{include file="public/foot" /}

<script type="text/javascript">

	/*管理员-删除*/

	function admin_del(obj,id){

		layer.confirm('确认要删除吗？',function(index){

			$.ajax({

				type: 'POST',

				url: '/admin/message/del?id='+id,

				dataType: 'json',

				success: function(data){

					$(obj).parents("tr").remove();

					layer.msg('已删除!',{icon:1,time:1000});

				},

				error:function(data) {

					console.log(data.msg);

				},

			});

		});

	}
</script>

